#include "ccolorpicker.h"

CColorPicker::CColorPicker(QDeclarativeItem *parent) :
    QDeclarativeItem(parent)
{    
    _corDlg = new QColorDialog();
}

CColorPicker::~CColorPicker()
{
    delete _corDlg;
}

void CColorPicker::Abrir()
{
    _corDlg->open(this, SLOT(corSelecionadaSlot(QColor)));
}

void CColorPicker::Fechar()
{
    _corDlg->close();
}

void CColorPicker::corSelecionadaSlot(QColor cor)
{
    _corSelecionada = cor;
    emit corSelecionadaChanged();
}
